package com.migu.contacts.bean;

import com.migu.contacts.util.NoticeUtil;

public class ActionBean {
    public String name;
    public String content;
    public boolean dayTipsStatus;
    public String startTime;
    public String endTime;

    public int tipsPreType;
    public int tipsPreTime;
    public boolean cycleTipsStatus;
    public int cycleType;
    public int cycleTime;
    public int momentsMatter;

    public String getNoticeLabel() {
//
//        list.add(new CreateTodoActivity.NoticeBean("准时", 1, 0));
//        list.add(new CreateTodoActivity.NoticeBean("提前10分钟", 2, 10));
//        list.add(new CreateTodoActivity.NoticeBean("提前15分钟", 2, 15));
//        list.add(new CreateTodoActivity.NoticeBean("提前30分钟", 2, 30));
//        list.add(new CreateTodoActivity.NoticeBean("提前1小时", 3, 1));
//        list.add(new CreateTodoActivity.NoticeBean("提前2小时", 3, 2));
//        list.add(new CreateTodoActivity.NoticeBean("提前1天", 4, 1));
//        list.add(new CreateTodoActivity.NoticeBean("提前2天", 4, 2));
//        list.add(new CreateTodoActivity.NoticeBean("提前1周", 5, 1));
        return NoticeUtil.getNoticeLabel(tipsPreType, tipsPreTime);
    }

    public String getStartTime() {
        if (dayTipsStatus) {
            if (startTime != null) {
                String[] split = startTime.split(" ");
                if (split.length > 1) {
                    return split[0];
                }
            }
        }
        return startTime;
    }

    public String getEndTime() {
        if (dayTipsStatus) {
            if (endTime != null) {
                String[] split = endTime.split(" ");
                if (split.length > 1) {
                    return split[0];
                }
            }
        }
        return endTime;
    }

    public String getImportance() {
//        0=无 1=低 2=中 3=高
        switch (momentsMatter) {
            case 1:
                return "低";
            case 2:
                return "中";
            case 3:
                return "高";
        }
        return "无";
    }
}
